﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CqusInfo.RAL.User;
using System.Collections;

namespace CqusInfo.DAL.User.Interface
{
    public interface IUserDAL
    {
        /// <summary>
        /// 得到表的总条数
        /// </summary>
        /// <param name="isDel">true：已删除 false：未删除</param>
        /// <returns></returns>
        Int32 GetCounts(bool isDel);
        /// <summary>
        /// 查找所有用户
        /// </summary>
        /// <param name="page">页数，第几页 需要减一</param>
        /// <param name="takeItem">每页显示的数目</param>
        /// <param name="isDel">true：已删除 false：未删除</param>
        /// <returns>动态类型</returns>
        List<UserModel> Query(Int32 page, Int32 takeItem, bool isDel);
        /// <summary>
        /// 添加数据 用户注册时用
        /// </summary>
        /// <param name="model">数据集</param>
        /// <returns>1：成功 0：失败</returns>
        Int32 Add(UserModel model);
        /// <summary>
        /// 删除用户（包括 伪删除，和彻底删除）
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <param name="isDel">true：已删除 false：未删除</param>
        /// <param name="trueDel">true：彻底删除  false：调用伪删除</param>
        /// <returns>1：成功 0：失败</returns>
        Int32 Delete(string userName, bool isDel, bool trueDel);
        /// <summary>
        /// 更改用户密码
        /// </summary>
        /// <param name="userName">userName</param>
        /// <param name="passWord">passWord</param>
        /// <returns>1：成功 0：失败</returns>
        Int32 Update_Password(string userName, string passWord);
    }
}
